﻿import com.dmotiko.mirador.*
import com.dmotiko.general.*
import mx.utils.Delegate;

class MiradorBtnGroup
extends MiradorBtn {
	private var mcBtnBar:MiradorBtnBar;
		
	private function initClip() {
		
	}
		
	public function setActive(b:Boolean, noEvent:Boolean):Void {
		if (!b) {
			MiradorSubBtnBar(this.data).getActiveBtn().setActive(false, true);
		}
		super.setActive(b, noEvent);		
	}
	
	private function btn_changed( evnt ):Void	{
		this._parent.dispatchEvent( { type: BaseClipEvent.CHANGED, data: evnt.data } );
	}
	
	public function onRelease():Void {
		//activo el primer boton de la subBotonera
		MiradorSubBtnBar(this.data).getButtons()[0].setActive(true);
		return;
	}
	
	public function onRollOver():Void {
		super.onRollOver();
		this.data.show();
		this.data.enabled = true;
	}
	
	public function getBtnBar():MiradorBtnBar { return mcBtnBar; }
		
}